import request from './request'

/**
 * 查询最新课程
 * @param {*} data 
 * @returns 
 */
export const mostNew = (data) => request({
  url: '/api/course/mostNew',
  method: 'post',
  data,
})

/**
 * 获取一级分类
 * @param {*} data 
 * @returns 
 */
export const getFirstCategorys = () => request({
  url: '/api/course/category/getFirstCategorys',
  method: 'get',
})

/**
 * 获取二级分类
 * @param {*} data 
 * @returns 
 */
export const getSceondCategorys = (params) => request({
  url: '/api/course/category/getSceondCategorys',
  method: 'get',
  params
})

/**
 * 查询课程
 * @param {*} data 
 * @returns 
 */
export const courseSearch = (data) => request({
  url: '/api/course/search',
  method: 'post',
  data
})